\(\int (a+b \sec ^2(c+d x))^3 \, dx\) [178]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 73 \[ \int \left (a+b \sec ^2(c+d x)\right )^3 \, dx=a^3 x+\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a+2 b) \tan ^3(c+d x)}{3 d}+\frac {b^3 \tan ^5(c+d x)}{5 d} \]

[Out]

a^3*x+b*(3*a^2+3*a*b+b^2)*tan(d*x+c)/d+1/3*b^2*(3*a+2*b)*tan(d*x+c)^3/d+1/5*b^3*tan(d*x+c)^5/d

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {4213, 398, 209} \[ \int \left (a+b \sec ^2(c+d x)\right )^3 \, dx=a^3 x+\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a+2 b) \tan ^3(c+d x)}{3 d}+\frac {b^3 \tan ^5(c+d x)}{5 d} \]

[In]

Int[(a + b*Sec[c + d*x]^2)^3,x]

[Out]

a^3*x + (b*(3*a^2 + 3*a*b + b^2)*Tan[c + d*x])/d + (b^2*(3*a + 2*b)*Tan[c + d*x]^3)/(3*d) + (b^3*Tan[c + d*x]^
5)/(5*d)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 398

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 4213

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist
[ff/f, Subst[Int[(a + b + b*ff^2*x^2)^p/(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p},
 x] && NeQ[a + b, 0] && NeQ[p, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (a+b+b x^2\right )^3}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {\text {Subst}\left (\int \left (b \left (3 a^2+3 a b+b^2\right )+b^2 (3 a+2 b) x^2+b^3 x^4+\frac {a^3}{1+x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a+2 b) \tan ^3(c+d x)}{3 d}+\frac {b^3 \tan ^5(c+d x)}{5 d}+\frac {a^3 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{d} \\ & = a^3 x+\frac {b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)}{d}+\frac {b^2 (3 a+2 b) \tan ^3(c+d x)}{3 d}+\frac {b^3 \tan ^5(c+d x)}{5 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.03 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.96 \[ \int \left (a+b \sec ^2(c+d x)\right )^3 \, dx=\frac {15 a^3 d x+15 b \left (3 a^2+3 a b+b^2\right ) \tan (c+d x)+5 b^2 (3 a+2 b) \tan ^3(c+d x)+3 b^3 \tan ^5(c+d x)}{15 d} \]

[In]

Integrate[(a + b*Sec[c + d*x]^2)^3,x]

[Out]

(15*a^3*d*x + 15*b*(3*a^2 + 3*a*b + b^2)*Tan[c + d*x] + 5*b^2*(3*a + 2*b)*Tan[c + d*x]^3 + 3*b^3*Tan[c + d*x]^
5)/(15*d)

Maple [A] (verified)

Time = 0.70 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.15

method result size
derivativedivides \(\frac {a^{3} \left (d x +c \right )+3 a^{2} b \tan \left (d x +c \right )-3 a \,b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-b^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}\) \(84\)
default \(\frac {a^{3} \left (d x +c \right )+3 a^{2} b \tan \left (d x +c \right )-3 a \,b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )-b^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}\) \(84\)
parts \(a^{3} x -\frac {b^{3} \left (-\frac {8}{15}-\frac {\sec \left (d x +c \right )^{4}}{5}-\frac {4 \sec \left (d x +c \right )^{2}}{15}\right ) \tan \left (d x +c \right )}{d}+\frac {3 a^{2} b \tan \left (d x +c \right )}{d}-\frac {3 a \,b^{2} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}\) \(85\)
risch \(a^{3} x +\frac {2 i b \left (45 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}+180 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+90 a b \,{\mathrm e}^{6 i \left (d x +c \right )}+270 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}+210 a b \,{\mathrm e}^{4 i \left (d x +c \right )}+80 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+180 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}+150 a b \,{\mathrm e}^{2 i \left (d x +c \right )}+40 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+45 a^{2}+30 a b +8 b^{2}\right )}{15 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{5}}\) \(165\)
norman \(\frac {a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}-a^{3} x +5 a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-10 a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+10 a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}-5 a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}-\frac {2 b \left (3 a^{2}+3 a b +b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 b \left (3 a^{2}+3 a b +b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{d}+\frac {8 b \left (9 a^{2}+6 a b +b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {8 b \left (9 a^{2}+6 a b +b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{3 d}-\frac {4 b \left (135 a^{2}+75 a b +29 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{15 d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{5}}\) \(258\)
parallelrisch \(\frac {15 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10} x d +\left (-90 a^{2} b -90 a \,b^{2}-30 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}-75 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} x d +360 b \left (a +\frac {b}{3}\right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}+150 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} x d +\left (-540 a^{2} b -300 a \,b^{2}-116 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}-150 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} x d +360 b \left (a +\frac {b}{3}\right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+75 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} x d +\left (-90 a^{2} b -90 a \,b^{2}-30 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-15 a^{3} x d}{15 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{5} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}\) \(260\)

[In]

int((a+b*sec(d*x+c)^2)^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^3*(d*x+c)+3*a^2*b*tan(d*x+c)-3*a*b^2*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)-b^3*(-8/15-1/5*sec(d*x+c)^4-4/1
5*sec(d*x+c)^2)*tan(d*x+c))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.23 \[ \int \left (a+b \sec ^2(c+d x)\right )^3 \, dx=\frac {15 \, a^{3} d x \cos \left (d x + c\right )^{5} + {\left ({\left (45 \, a^{2} b + 30 \, a b^{2} + 8 \, b^{3}\right )} \cos \left (d x + c\right )^{4} + 3 \, b^{3} + {\left (15 \, a b^{2} + 4 \, b^{3}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{15 \, d \cos \left (d x + c\right )^{5}} \]

[In]

integrate((a+b*sec(d*x+c)^2)^3,x, algorithm="fricas")

[Out]

1/15*(15*a^3*d*x*cos(d*x + c)^5 + ((45*a^2*b + 30*a*b^2 + 8*b^3)*cos(d*x + c)^4 + 3*b^3 + (15*a*b^2 + 4*b^3)*c
os(d*x + c)^2)*sin(d*x + c))/(d*cos(d*x + c)^5)

Sympy [F]

\[ \int \left (a+b \sec ^2(c+d x)\right )^3 \, dx=\int \left (a + b \sec ^{2}{\left (c + d x \right )}\right )^{3}\, dx \]

[In]

integrate((a+b*sec(d*x+c)**2)**3,x)

[Out]

Integral((a + b*sec(c + d*x)**2)**3, x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.14 \[ \int \left (a+b \sec ^2(c+d x)\right )^3 \, dx=a^{3} x + \frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a b^{2}}{d} + \frac {{\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} b^{3}}{15 \, d} + \frac {3 \, a^{2} b \tan \left (d x + c\right )}{d} \]

[In]

integrate((a+b*sec(d*x+c)^2)^3,x, algorithm="maxima")

[Out]

a^3*x + (tan(d*x + c)^3 + 3*tan(d*x + c))*a*b^2/d + 1/15*(3*tan(d*x + c)^5 + 10*tan(d*x + c)^3 + 15*tan(d*x +
c))*b^3/d + 3*a^2*b*tan(d*x + c)/d

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.25 \[ \int \left (a+b \sec ^2(c+d x)\right )^3 \, dx=\frac {3 \, b^{3} \tan \left (d x + c\right )^{5} + 15 \, a b^{2} \tan \left (d x + c\right )^{3} + 10 \, b^{3} \tan \left (d x + c\right )^{3} + 15 \, {\left (d x + c\right )} a^{3} + 45 \, a^{2} b \tan \left (d x + c\right ) + 45 \, a b^{2} \tan \left (d x + c\right ) + 15 \, b^{3} \tan \left (d x + c\right )}{15 \, d} \]

[In]

integrate((a+b*sec(d*x+c)^2)^3,x, algorithm="giac")

[Out]

1/15*(3*b^3*tan(d*x + c)^5 + 15*a*b^2*tan(d*x + c)^3 + 10*b^3*tan(d*x + c)^3 + 15*(d*x + c)*a^3 + 45*a^2*b*tan
(d*x + c) + 45*a*b^2*tan(d*x + c) + 15*b^3*tan(d*x + c))/d

Mupad [B] (verification not implemented)

Time = 18.69 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.00 \[ \int \left (a+b \sec ^2(c+d x)\right )^3 \, dx=\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (3\,b\,{\left (a+b\right )}^2-3\,b^2\,\left (a+b\right )+b^3\right )+\frac {b^3\,{\mathrm {tan}\left (c+d\,x\right )}^5}{5}+{\mathrm {tan}\left (c+d\,x\right )}^3\,\left (b^2\,\left (a+b\right )-\frac {b^3}{3}\right )+a^3\,d\,x}{d} \]

[In]

int((a + b/cos(c + d*x)^2)^3,x)

[Out]

(tan(c + d*x)*(3*b*(a + b)^2 - 3*b^2*(a + b) + b^3) + (b^3*tan(c + d*x)^5)/5 + tan(c + d*x)^3*(b^2*(a + b) - b
^3/3) + a^3*d*x)/d